﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CrossQuery
{
    public class DateType : IType
    {

        private DateTime dt;

        public DateType()
        {
            dt = System.DateTime.Now;
        }

        public string Value
        {
            get { return dt.ToString(); }
            set { dt = DateTime.Parse(value); }
        }

        public string Type
        {
            get { return "Date"; }
        }

        public DateTime Time
        {
            get { return dt; }
            set { dt = value; }
        }

        public string ToSQLString()
        {
            return "'" + dt.ToString() + "'";
        }

        public override string ToString()
        {
            return dt.ToString();
        }
    }
}
